package xj.toolkit.netty.handler.codec.http.response;

import io.netty.handler.codec.http.HttpResponseStatus;

/**
 * @author hp
 *
 */
public class DefaultNettyResponseSource implements ResponseSource {

	private String contentType;
	private HttpResponseStatus status;
	private byte[] content;
	private int length;
	private String contentRange;
	private String date;

	/**
	 * @param contentType
	 *            the contentType to set
	 */
	public void setContentType(String contentType) {
		this.contentType = contentType;
	}

	/**
	 * @param status
	 *            the status to set
	 */
	public void setStatus(HttpResponseStatus status) {
		this.status = status;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.skymobi.http.ResponseSource#getContent()
	 */
	public byte[] getContent() {
		return content;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.skymobi.http.ResponseSource#getContentLength()
	 */
	public int getContentLength() {
		return length;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.skymobi.http.ResponseSource#getContentType()
	 */
	public String getContentType() {
		return contentType;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.skymobi.http.ResponseSource#getStatus()
	 */
	public HttpResponseStatus getStatus() {
		return status;
	}

	/**
	 * @param content
	 *            the inputStream to set
	 */
	public void setContent(byte[] content) {
		this.content = content;
	}

	/**
	 * @param length
	 *            the length to set
	 */
	public void setContentLength(int length) {
		this.length = length;
	}

	public void setContentRange(String contentRange) {
		this.contentRange = contentRange;
	}

	public String getContentRange() {
		return contentRange;
	}

	/**
	 * @param date
	 *            the date to set
	 */
	public void setDate(String date) {
		this.date = date;
	}

	/**
	 * @return the date
	 */
	public String getDate() {
		return date;
	}

}
